<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ include file="../general/header.jsp" %>
<h3>Puesto de trabajo</h3>
<div class="menuacciones">
	<c:if test="${user.admin}">
		<a href="../notification/viewWorkPosts" class="boton volver">Volver</a>
	</c:if>
	<c:if test="${!user.admin}">
		<a href="../general/index" class="boton volver">Volver</a>
	</c:if>
</div>
<div class="perfil">
	<div class="box-datos">
		<div class="titulo">
			<h2><c:out value="${workPost.title}"/></h2>
		</div>
		<div class="contenido">
			<div class="datos">
				<div class="showingField"> 
						<div class="fieldName">	<span>Creado por:</span>	</div> 
						<div class="fieldContent">	<c:out value="${workPost.creator.name}"/> <c:out value="${workPost.creator.lastName}"/></div> 
				</div>
				<div class="showingField"> 
						<div class="fieldName">	<span>Tipo de Puesto:</span>	</div> 
						<div class="fieldContent">	<c:out value="${workPost.hours}"/></div> 
				</div>
				<div class="showingField"> 
						<div class="fieldName">	<span>Fecha de inicio:</span>	</div> 
						<div class="fieldContent">	<fmt:formatDate pattern="dd/MM/yyyy" value="${workPost.start}"/></div> 
				</div>
				<div class="showingField"> 
						<div class="fieldName">	<span>Descripci&oacute;n del Puesto:</span>	</div> 
						<div class="fieldContent">	<span><c:out escapeXml="false" value="${workPost.description}"/></span></div> 
				</div>
				<c:if test="${userlogged.admin}">
					<div class="showingField"> 
						<div class="fieldName">	<span>Invitados:</span>	</div> 
						<div class="fieldContent">
							<ul>
								<c:forEach var="invitee" items="${workPost.usersInvited}">
									<li><c:out value="${invitee.lastName}"/>, <c:out value="${invitee.name}"/></li>
								</c:forEach>
							</ul>
						</div>
					</div>
				</c:if>
			</div>
			<div class="clear"></div>
		</div>
	</div>
</div>
<%@ include file="../general/footer.jsp" %>
